class Restaurant:
    def __init__(self, name, type):
        self.name = name
        self.type = type

    def descript(self):
        print(f'{self.name}---{self.type}')


class IceCreamStand(Restaurant):
    def __init__(self, name, type):
        super().__init__(name, type)
        self.flavors = []

    def add_flavors(self, *names):
        for name in names:
            self.flavors.append(name)

    def descript(self):
        super().descript()
        print(f'{self.flavors}')


my_is = IceCreamStand('KFC', 'kuaicai')
my_is.add_flavors('fengli', 'caimei')
my_is.descript()


class User:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def descript(self):
        print(f'{self.name}---{self.age}')


class Admin(User):
    def __init__(self, name, age):
        super().__init__(name, age)
        self.privileges = Privileges(['remove'])

    def descript(self):
        super().descript()
        self.privileges.descript()


class Privileges:
    def __init__(self, privileges=None):
        if privileges is None:
            privileges = ['add', 'query', 'delete', 'update']
        self.privileges = privileges

    def descript(self):
        print(self.privileges)


admin = Admin('slj', 10)
admin.descript()
